import 'package:flutter/material.dart';
import 'package:xiongan_app_yy/pages/address_book/address_book_page.dart';
import 'package:xiongan_app_yy/pages/address_book/address_book_search.dart';

import 'package:xiongan_app_yy/pages/auto_mounting/automounting.dart';
import 'package:xiongan_app_yy/pages/auto_mounting/automounting_dd_one.dart';
import 'package:xiongan_app_yy/pages/auto_mounting/automounting_dd_two.dart';
import 'package:xiongan_app_yy/pages/auto_mounting/automounting_ddetail.dart';
import 'package:xiongan_app_yy/pages/auto_mounting/automounting_detail_list.dart';
import 'package:xiongan_app_yy/pages/auto_mounting/automounting_type.dart';
import 'package:xiongan_app_yy/pages/auto_mounting/select_location.dart';
import 'package:xiongan_app_yy/pages/auto_picking/autopicking.dart';
import 'package:xiongan_app_yy/pages/auto_picking/autopicking_detail.dart';
import 'package:xiongan_app_yy/pages/auto_picking/autopicking_detail_list.dart';
import 'package:xiongan_app_yy/pages/auto_picking/autopicking_type.dart';
import 'package:xiongan_app_yy/pages/common/car_info_list_details.dart';
import 'package:xiongan_app_yy/pages/common/car_info_list_select.dart';
import 'package:xiongan_app_yy/pages/common/empty_page.dart';
import 'package:xiongan_app_yy/pages/common/image_details.dart';
import 'package:xiongan_app_yy/pages/deployment/deployment_details_info_list.dart';
import 'package:xiongan_app_yy/pages/deployment/deployment_details_new.dart';
import 'package:xiongan_app_yy/pages/delivery/delivery_list_details_page.dart';
import 'package:xiongan_app_yy/pages/delivery/delivery_list_page.dart';
import 'package:xiongan_app_yy/pages/delivery/delivery_list_page_new.dart';
import 'package:xiongan_app_yy/pages/delivery/delivery_search_page.dart';
import 'package:xiongan_app_yy/pages/deployment/deployment_list_page.dart';
import 'package:xiongan_app_yy/pages/deployment/deployment_list_page_new.dart';
import 'package:xiongan_app_yy/pages/empty_stacking/emptystacking.dart';
import 'package:xiongan_app_yy/pages/executive_sampling/executivesampling.dart';
import 'package:xiongan_app_yy/pages/executive_sampling/executivesampling_detail.dart';
import 'package:xiongan_app_yy/pages/executive_sampling/executivesampling_list.dart';
import 'package:xiongan_app_yy/pages/executive_sampling/executivesampling_search_page.dart';
import 'package:xiongan_app_yy/pages/home/home_page.dart';
import 'package:xiongan_app_yy/pages/home/message_details_page.dart';
import 'package:xiongan_app_yy/pages/home/warehouse_selection_page.dart';
import 'package:xiongan_app_yy/pages/inStorage_order/inv_search_page.dart';
import 'package:xiongan_app_yy/pages/in_task_record/in_task_search.dart';
import 'package:xiongan_app_yy/pages/lib_back/lib_back_search_page.dart';
import 'package:xiongan_app_yy/pages/norder_audit_result/norder_audit_result_search.dart';
import 'package:xiongan_app_yy/pages/out_task_record/out_task_search.dart';
import 'package:xiongan_app_yy/pages/return_booking/return_search_page.dart';
import 'package:xiongan_app_yy/pages/task/into_warehousing/into_handover_details.dart';
import 'package:xiongan_app_yy/pages/inventory_operation/inventoryopr_list.dart';
import 'package:xiongan_app_yy/pages/lib_back/lib_back.dart';
import 'package:xiongan_app_yy/pages/lib_back/lib_back_details.dart';
import 'package:xiongan_app_yy/pages/lib_back/lib_back_list.dart';
import 'package:xiongan_app_yy/pages/move_library/move_in_select.dart';
import 'package:xiongan_app_yy/pages/inventory_operation/inventoryopr.dart';
import 'package:xiongan_app_yy/pages/inventory_operation/inventoryopr_detail.dart';
import 'package:xiongan_app_yy/pages/move_library/move_library.dart';
import 'package:xiongan_app_yy/pages/in_task_record/in_task.dart';
import 'package:xiongan_app_yy/pages/in_task_record/in_task_details.dart';
import 'package:xiongan_app_yy/pages/in_task_record/in_task_mterial_details.dart';
import 'package:xiongan_app_yy/pages/my_info/card_qr_code_page.dart';
import 'package:xiongan_app_yy/pages/my_info/change_password_page.dart';
import 'package:xiongan_app_yy/pages/my_info/download_code_page.dart';
import 'package:xiongan_app_yy/pages/my_info/function_introduction_page.dart';
import 'package:xiongan_app_yy/pages/my_info/new_version_page.dart';
import 'package:xiongan_app_yy/pages/my_info/password_submission_page.dart';
import 'package:xiongan_app_yy/pages/my_info/personal_data_page.dart';
import 'package:xiongan_app_yy/pages/norder_audit_result/norderauditresult.dart';
import 'package:xiongan_app_yy/pages/out_task_record/out_task.dart';
import 'package:xiongan_app_yy/pages/out_task_record/out_task_details.dart';
import 'package:xiongan_app_yy/pages/outstorage_order/out_search_page.dart';
import 'package:xiongan_app_yy/pages/record/info_list.dart';
import 'package:xiongan_app_yy/pages/return_booking/return_booking.dart';
import 'package:xiongan_app_yy/pages/return_booking/return_booking_detail.dart';
import 'package:xiongan_app_yy/pages/return_booking/return_booking_new.dart';
import 'package:xiongan_app_yy/pages/inventory/Inv_counter_details.dart';
import 'package:xiongan_app_yy/pages/inventory/inv_counter_id_add.dart';
import 'package:xiongan_app_yy/pages/inStorage_order/inv_list_item_details_page.dart';
import 'package:xiongan_app_yy/pages/inStorage_order/inv_list_page.dart';
import 'package:xiongan_app_yy/pages/inStorage_order/inv_list_page_new.dart';

import 'package:xiongan_app_yy/pages/login/login_page.dart';
import 'package:xiongan_app_yy/pages/outstorage_order/out_list_page.dart';
import 'package:xiongan_app_yy/pages/outstorage_order/out_list_page_new.dart';
import 'package:xiongan_app_yy/pages/common/storage_details_page.dart';
import 'package:xiongan_app_yy/pages/reserve/subscribe_list.dart';
import 'package:xiongan_app_yy/pages/common/success_page.dart';
import 'package:xiongan_app_yy/pages/task/into_warehousing/into_handover_details_info.dart';
import 'package:xiongan_app_yy/pages/task/into_warehousing/into_warehousing.dart';
import 'package:xiongan_app_yy/pages/task/into_warehousing/warehousing_search_page.dart';
import 'package:xiongan_app_yy/pages/task/out_warehousing/out_handover_details.dart';
import 'package:xiongan_app_yy/pages/task/out_warehousing/out_handover_details_info.dart';
import 'package:xiongan_app_yy/pages/task/out_warehousing/out_warehousing.dart';
import 'package:xiongan_app_yy/pages/task/out_warehousing/out_warehousing_search_page.dart';
import 'package:xiongan_app_yy/pages/task/task_list.dart';
import 'package:xiongan_app_yy/pages/to_review/toreview.dart';
import 'package:xiongan_app_yy/pages/to_review/toreview_detail.dart';
import 'package:xiongan_app_yy/pages/to_review/toreview_detail_list.dart';
import 'package:xiongan_app_yy/pages/unprocessed_task/back_task_wait_details.dart';
import 'package:xiongan_app_yy/pages/unprocessed_task/change_task_wait_details.dart';
import 'package:xiongan_app_yy/pages/unprocessed_task/distribution_management/logistics_response_page.dart';
import 'package:xiongan_app_yy/pages/unprocessed_task/distribution_management/not_evaluated_page.dart';
import 'package:xiongan_app_yy/pages/unprocessed_task/distribution_management/pending_approval_page.dart';
import 'package:xiongan_app_yy/pages/unprocessed_task/inv_task_wait_details.dart';
import 'package:xiongan_app_yy/pages/unprocessed_task/move_task_wait_details.dart';
import 'package:xiongan_app_yy/pages/unprocessed_task/out_task_wait_details.dart';
import 'package:xiongan_app_yy/pages/unprocessed_task/tab_page.dart';
import 'package:xiongan_app_yy/pages/unprocessed_task/wait_approve_plan_list.dart';
import 'package:xiongan_app_yy/pages/unprocessed_task/wait_task_list.dart';
import 'package:xiongan_app_yy/pages/warehousing_returns/warehousing_mterial_details.dart';
import 'package:xiongan_app_yy/pages/warehousing_returns/warehousing_return_search.dart';
import 'package:xiongan_app_yy/pages/warehousing_returns/warehousing_returns.dart';
import 'package:xiongan_app_yy/pages/warehousing_returns/warehousing_returns_details.dart';
import 'package:xiongan_app_yy/widgets/search_widget.dart';

//路由配置文件
class Routers {
  static init({RouteSettings settings}) {
    WidgetBuilder builder;
    if (settings.name == '/') {
      builder = (BuildContext context) => LoginPage();
    } else if (settings.name == '/emptyPage') {
      //空白界面
      builder = (BuildContext context) => EmptyPage();
    } else if (settings.name == '/login') {
      //登录界面
      builder = (BuildContext context) => LoginPage();
    } else if (settings.name == '/home') {
      //主页界面
      builder = (BuildContext context) => HomePage();
    } else if (settings.name == '/invList') {
      //入库预约
      builder = (BuildContext context) => InvListPage(settings.arguments);
    } else if (settings.name == '/outvList') {
      //出库预约
      builder = (BuildContext context) => OutvListPage(settings.arguments);
    } else if (settings.name == '/invListNew') {
      //入库预约-新建
      builder = (BuildContext context) => InvListPageNew(settings.arguments);
    } else if (settings.name == '/outvListNew') {
      //出库预约-新建
      builder = (BuildContext context) => OutvListPageNew(settings.arguments);
    } else if (settings.name == '/into_warehousing') {
      //入库作业
      builder = (BuildContext context) => IntoWarehousing();
    } else if (settings.name == '/out_warehousing') {
      //出库作业
      builder = (BuildContext context) => OutWarehousing();
    } else if (settings.name == '/invCounterDetails') {
      //清点贴标详情
      builder = (BuildContext context) => InvCounterDetails(settings.arguments);
    } else if (settings.name == '/invCounterId') {
      //清点贴标id维护
      builder = (BuildContext context) => IdCounterAdd(settings.arguments);
    } else if (settings.name == '/success') {
      //完成页
      builder = (BuildContext context) => SuccessPage();
    } else if (settings.name == '/storageDetails') {
      //物资详情
      builder =
          (BuildContext context) => StorageDetailsPage(settings.arguments);
    } else if (settings.name == '/deploymentyDetailsList') {
      //物资明细详情
      builder = (BuildContext context) =>
          DeploymentDetailsInfoList(settings.arguments);
    } else if (settings.name == '/warehouseSelection') {
      //仓库选择
      builder = (BuildContext context) => WarehouseSelectionPage();
    } else if (settings.name == '/subscribeList') {
      //预约
      builder = (BuildContext context) => SubscribeListPage();
    } else if (settings.name == '/taskList') {
      //作业
      builder = (BuildContext context) => TaskListPage();
    } else if (settings.name == '/infoList') {
      //信息
      builder = (BuildContext context) => InfoListPage();
    } else if (settings.name == '/invListItemDetails') {
      //入库预约提交以后列表点击详情
      builder =
          (BuildContext context) => InvListItemDetailsPage(settings.arguments);
    } else if (settings.name == '/deliveryListDetails') {
      //配送预约提交以后列表点击详情
      builder =
          (BuildContext context) => DeliveryListDetailsPage(settings.arguments);
    } else if (settings.name == '/deploymentListDetailsNew') {
      //配送预约提交以后列表点击详情
      builder =
          (BuildContext context) => DeploymentDetailsNew(settings.arguments);
    } else if (settings.name == '/search') {
      //搜索界面
      builder = (BuildContext context) => SearchWidget();
    } else if (settings.name == '/auto_mounting') {
      //自动上架
      builder = (BuildContext context) => AutoMounting();
    } else if (settings.name == '/auto_mounting_type') {
      //自动上架
      builder = (BuildContext context) => AutoMountingType();
    } else if (settings.name == '/automounting_detail_list') {
      //自动上架—详情列表
      builder = (BuildContext context) => AutoMountingDetailList();
    } else if (settings.name == '/automounting_ddetail') {
      //自动上架—详情
      builder = (BuildContext context) => AutoMountingDDetail();
    } else if (settings.name == '/automounting_ddetail_one') {
      //自动上架—详情（人工分配上架）
      builder = (BuildContext context) => AutoMountingDDetailOne();
    } else if (settings.name == '/automounting_ddetail_two') {
      //自动上架—详情（分配上架）
      builder = (BuildContext context) => AutoMountingDDetailTwo();
    } else if (settings.name == '/select_location') {
      //自动上架——选择货位
      builder = (BuildContext context) => SelectLocation(settings.arguments);
    } else if (settings.name == '/auto_picking') {
      //自动拣选
      builder = (BuildContext context) => AutoPicking();
    } else if (settings.name == '/autopicking_type') {
      //自动拣选—类型选择
      builder = (BuildContext context) => AutoPickingType(settings.arguments);
    } else if (settings.name == '/autopicking_detail_list') {
      //自动拣选—详情列表
      builder =
          (BuildContext context) => AutoPickingDetailList(settings.arguments);
    } else if (settings.name == '/autopicking_detail') {
      //自动拣选—详情
      builder = (BuildContext context) => AutoPickingDetail(settings.arguments);
    } else if (settings.name == '/move_library') {
      //作业—移库作业查询
      builder = (BuildContext context) => MoveLibrary();
    } else if (settings.name == '/toreview') {
      //复核
      builder = (BuildContext context) => ToReview();
    } else if (settings.name == '/toreview_detail_list') {
      //复核-物资列表详情
      builder =
          (BuildContext context) => ToreviewDetailList(settings.arguments);
    } else if (settings.name == '/toreview_detail') {
      //复核—详情
      builder = (BuildContext context) => ToReviewDetail(settings.arguments);
    } else if (settings.name == '/inventoryopr') {
      //盘库作业
      builder = (BuildContext context) => InventoryOperation();
    } else if (settings.name == '/inventoryopr_list') {
      //盘库单
      builder =
          (BuildContext context) => InventoryOperationList(settings.arguments);
    } else if (settings.name == '/inventoryopr_detail') {
      //盘库作业—详情
      builder = (BuildContext context) =>
          InventoryOperationDetail(settings.arguments);
    } else if (settings.name == '/executive_sampling') {
      //执行抽样
      builder = (BuildContext context) => ExecutiveSampling();
    } else if (settings.name == '/executivesampling_list') {
      //执行抽样—详情列表
      builder =
          (BuildContext context) => ExecutiveSamplingList(settings.arguments);
    } else if (settings.name == '/executivesampling_detail') {
      //执行抽样—详情
      builder =
          (BuildContext context) => ExecutiveSamplingDetail(settings.arguments);
    } else if (settings.name == '/empty_stacking') {
      //空盘叠盘
      builder = (BuildContext context) => EmptyStacking();
    } else if (settings.name == '/move_in_select') {
      //作业—移库作业查询—选择移入货位
      builder = (BuildContext context) => MoveInSelect();
    } else if (settings.name == '/out_task') {
      //信息-出库任务
      builder = (BuildContext context) => OutTask();
    } else if (settings.name == '/out_task_search') {
      //信息-出库任务搜索
      builder = (BuildContext context) => OutTaskSearch();
    } else if (settings.name == '/out_task_details') {
      //信息-出库任务-详情
      builder = (BuildContext context) => OutTaskDetails(settings.arguments);
    } else if (settings.name == '/in_task') {
      //信息-入库任务
      builder = (BuildContext context) => InTask();
    } else if (settings.name == '/in_task_search') {
      //信息-入库任务搜索
      builder = (BuildContext context) => InTaskSearch();
    } else if (settings.name == '/in_task_details') {
      //信息-入库任务-详情
      builder = (BuildContext context) => InTaskDetails(settings.arguments);
    } else if (settings.name == '/in_task_mterial_details') {
      //信息-入库任务-详情-物资明细
      builder =
          (BuildContext context) => InTaskMterialDetails(settings.arguments);
    } else if (settings.name == '/delivery_list') {
      //预约-配送预约
      builder = (BuildContext context) => DeliveryListPage(settings.arguments);
    } else if (settings.name == '/delivery_list_page_new') {
      //预约-配送预约新建
      builder =
          (BuildContext context) => DeliveryListPageNew(settings.arguments);
    } else if (settings.name == '/return_booking') {
      //退货预约——列表
      builder = (BuildContext context) => ReturnBooking(settings.arguments);
    } else if (settings.name == '/return_booking_new') {
      //退货预约——新建
      builder = (BuildContext context) => ReturnBookingNew(settings.arguments);
    } else if (settings.name == '/return_search') {
      //退货搜索
      builder = (BuildContext context) => ReturnSearch();
    } else if (settings.name == '/return_booking_detail') {
      //退货预约——详情
      builder =
          (BuildContext context) => ReturnBookingDetail(settings.arguments);
    } else if (settings.name == '/norderAuditResult') {
      //空盘叠盘
      builder = (BuildContext context) => NorderAuditResult();
    } else if (settings.name == '/norderAuditResultSearch') {
      //非预约审核搜索
      builder =
          (BuildContext context) => NorderAuditResultSearch(settings.arguments);
    } else if (settings.name == '/inv_search_page') {
      //入库预约搜索
      builder = (BuildContext context) => InvSearchPage();
    } else if (settings.name == '/out_search_page') {
      //出库预约搜索
      builder = (BuildContext context) => OutSearchPage();
    } else if (settings.name == '/delivery_search_page') {
      //配送预约搜索
      builder = (BuildContext context) => DeliverySearchPage();
    } else if (settings.name == '/personal_data_page') {
      //个人资料
      builder = (BuildContext context) => PersonalDataPage(settings.arguments);
    } else if (settings.name == '/change_password_page') {
      //修改密码检查页
      builder = (BuildContext context) => ChangePasswordPage();
    } else if (settings.name == '/card_qr_codePage') {
      //二维码名片
      builder = (BuildContext context) => CardQrCodePage();
    } else if (settings.name == '/function_introduction_page') {
      //功能介绍
      builder = (BuildContext context) => FunctionIntroductionPage();
    } else if (settings.name == '/download_code_page') {
      //下载二维码
      builder = (BuildContext context) => DownloadCodePage();
    } else if (settings.name == '/new_version_page') {
      //检查新版本
      builder = (BuildContext context) => NewVersionPage();
    } else if (settings.name == '/password_submission_page') {
      //新密码提交页
      builder = (BuildContext context) => PasswordSubmissionPage();
    } else if (settings.name == '/warehousing_returns') {
      //信息-入库退货列表
      builder = (BuildContext context) => WarehousingReturns();
    } else if (settings.name == '/deployment_list') {
      //调配预约
      builder = (BuildContext context) => DeploymentListPage();
    } else if (settings.name == '/deployment_list_page_new') {
      //调配预约新建
      builder =
          (BuildContext context) => DeploymentListPageNew(settings.arguments);
    } else if (settings.name == '/lib_back') {
      //回库一级列表
      builder = (BuildContext context) => LibBack();
    } else if (settings.name == '/lib_back_list') {
      //回库列表
      builder = (BuildContext context) => LibBackList(settings.arguments);
    } else if (settings.name == '/lib_back_details') {
      //回库详情
      builder = (BuildContext context) => LibBackDetails(settings.arguments);
    } else if (settings.name == '/warehousing_returns_details') {
      //信息-入库退货详情
      builder = (BuildContext context) =>
          WarehousingReturnsDetails(settings.arguments);
    } else if (settings.name == '/warehousing_mterial_details') {
      //信息-入库退货详情-物资明细
      builder = (BuildContext context) =>
          WarehousingMterialDetails(settings.arguments);
    } else if (settings.name == '/into_handover_details') {
      //入库交接
      builder =
          (BuildContext context) => IntoHandoverDetails(settings.arguments);
    } else if (settings.name == '/into_handover_details_info') {
      //入库交接明细
      builder =
          (BuildContext context) => IntoHandoverDetailsInfo(settings.arguments);
    } else if (settings.name == '/out_handover_details') {
      //出库交接
      builder =
          (BuildContext context) => OutHandoverDetails(settings.arguments);
    } else if (settings.name == '/out_handover_details_info') {
      //出库交接明细
      builder =
          (BuildContext context) => OutHandoverDetailsInfo(settings.arguments);
    } else if (settings.name == '/message_details') {
      //消息详情页
      builder =
          (BuildContext context) => MessageDetailsPage(settings.arguments);
    } else if (settings.name == '/tabPage') {
      //任务待办
      builder = (BuildContext context) => TabPage();
    } else if (settings.name == '/invTaskWaitDetails') {
      //入库任务待办详情
      builder = (BuildContext context) => InvTaskWaitDetails();
    } else if (settings.name == '/outTaskWaitDetails') {
      //出库任务待办详情
      builder = (BuildContext context) => OutTaskWaitDetails();
    } else if (settings.name == '/moveTaskWaitDetails') {
      //移库任务待办详情
      builder = (BuildContext context) => MoveTaskWaitDetails();
    } else if (settings.name == '/changeTaskWaitDetails') {
      //盘库任务待办详情
      builder = (BuildContext context) => ChangeTaskWaitDetails();
    } else if (settings.name == '/backTaskWaitDetails') {
      //退库任务待办详情
      builder = (BuildContext context) => BackTaskWaitDetails();
    } else if (settings.name == '/imageDetails') {
      //图片详情
      builder = (BuildContext context) => ImageDetails(settings.arguments);
    } else if (settings.name == '/pendingApprovalPage') {
      //任务待办配送管理待审批
      builder = (BuildContext context) => PendingApprovalPage();
    } else if (settings.name == '/logisticsResponsePage') {
      //任务待办配送管理待物流商响应
      builder = (BuildContext context) => LogisticsResponsePage();
    } else if (settings.name == '/notEvaluatedPage') {
      //任务待办配送管理待评价
      builder = (BuildContext context) => NotEvaluatedPage();
    } else if (settings.name == '/addressBook') {
      //通讯录
      builder = (BuildContext context) => AddressBookPage();
    } else if (settings.name == '/addressBookSearch') {
      //通讯录
      builder = (BuildContext context) => AddressBookSearch();
    } else if (settings.name == '/waitApprovePlan') {
      //待审批抽检计划
      builder = (BuildContext context) => WaitApprovePlanList();
    } else if (settings.name == '/waitTaskList') {
      //待完成检测任务&&待样品回库任务
      builder = (BuildContext context) => WaitTaskList(settings.arguments);
    } else if (settings.name == '/carSelect') {
      //车辆选择
      builder = (BuildContext context) => CarInfoListSelect(settings.arguments);
    } else if (settings.name == '/carDetails') {
      //车辆信息
      builder =
          (BuildContext context) => CarInfoListDetails(settings.arguments);
    } else if (settings.name == '/warehousingSearchPage') {
      //入库作业搜索
      builder = (BuildContext context) => WarehousingSearchPage();
    }else if (settings.name == '/warehousingReturnSearch') {
      //入库退货搜索
      builder = (BuildContext context) => WarehousingReturnSearch();
    }else if (settings.name == '/outWarehousingSearchPage') {
      //出库作业搜索
      builder = (BuildContext context) => OutWarehousingSearchPage();
    }else if (settings.name == '/executivesamplingSearchPage') {
      //执行抽样搜索
      builder = (BuildContext context) => ExecutivesamplingSearchPage();
    }else if (settings.name == '/libBackSearchPage') {
      //样品回库搜索
      builder = (BuildContext context) => LibBackSearchPage();
    }



    return MaterialPageRoute(builder: builder, settings: settings);
  }
}
